package com.invoicing.Service;

import com.invoicing.dao.VendMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.invoicing.entity.Vend;
@Service
public class VendService {
    @Autowired
    private VendMapper vendMapper;

    public int getRecentVend(){
        return vendMapper.selectRecent();
    }
    public int selectMax(){
        return vendMapper.selectMax();
    }
    public int updateCost(int id,float cost){
        return vendMapper.updateCost(id,cost);
    }
    public Vend getById(int id){return vendMapper.selectById(id);}

    public float getTotalCost(){return vendMapper.totalCost();}
}
